package cn.drenal.user;

import cn.drenal.common.Constants;

public class User
{
    private String usrname, usrPsw; //用户名，密码
    private Integer lvl;            //用户等级
    private Double balance;

    public User(String usrname, String usrPsw, Integer lvl, Double balance)
    {
        this.usrname = usrname;
        this.usrPsw = usrPsw;
        this.lvl = lvl;
        if (lvl == Constants.LVL_USR_ADMIN) this.balance = -1.0;
        else this.balance = balance;
    }

    public Double getBalance()
    {
        return balance;
    }

    public void setBalance(Double balance) { this.balance = balance; }

    public String getUsrname()
    {
        return usrname;
    }

    public void setUsrname(String usrname)
    {
        this.usrname = usrname;
    }

    public String getUsrPsw()
    {
        return usrPsw;
    }

    public void setUsrPsw(String usrPsw)
    {
        this.usrPsw = usrPsw;
    }

    public Integer getLvl()
    {
        return lvl;
    }

    public void setLvl(Integer lvl)
    {
        this.lvl = lvl;
    }

}
